package com.hoo.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;

import com.hoo.common.constant.Constant;
import com.hoo.service.equipment.InvoiceMachineService;

public class EquipmentServlet extends HttpServlet {

	public EquipmentServlet() {
		super();
	}

	public void destroy() {
		super.destroy(); 
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

	}

	public void init() throws ServletException {
		WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();
		InvoiceMachineService invoiceMachineService = (InvoiceMachineService)wac.getBean("invoiceMachineService");
		invoiceMachineService.updateInvoiceMachineConnectStatus(Constant.CONNECT_STATUS_FAIL);
	}
}
